echo "-----------------------------------"
echo ""
echo "    JaPyT Updater/Launcher v1.1"
echo " (c) 2oo9 Disabler Production Lab."
echo ""
echo "-----------------------------------"
echo ""
echo "Update to current revision"
svn cleanup
svn up

pkgrel=`svnversion "../japyt/"`
sed "s/\(rSVN\)/r${pkgrel}/" -i "japyt.py"
echo "Patched to revision ${pkgrel}"

echo "Compile JaPyT"
python make.py
rm japyt.py -r

echo "Set permission"
chmod 777 conference
chmod 777 config
chmod 777 settings

echo "Done"
echo ""
echo "Launch JaPyT"
echo ""
python japyt.pyc
